<template>
	<view>		
		<view class="container box-white bg-img">
			<view class="percents" :style="[{ height: height == 0 ? '100%' : height + 'px' }]">
				<view class="percents-boxs">
					<view class="percent-head text-green text-bold">数字游乡村</view>
					<view class="percent-content flex justify-center">
						<view class="text-green text-bold">
							<view>数游乡村</view>
							<view>身临其境</view>
						</view>
					</view>
					<view class="percent-image"> </view>
				</view>
			</view>
		</view>		
	</view>
</template>

<script>	
	import { mapActions } from 'vuex';
	
	export default {
		data() {
			return {
				height: this.s_h,
				referrerId:null
			}
		},
		onReady(){
			setTimeout(()=>this.checkLogin(this.referrerId),1000)
		},
		onLoad(options){
			// 获取到二维码原始链接内容，即上图生成二维码的地址。
			const url = decodeURIComponent(options.q);
			if (url !== 'undefined') {
				let params = this.GetWxMiniProgramUrlParam(url);//获取二维码路径参数
				let userId=params.id
				if(userId!=null){
					this.referrerId=userId
				}				
			}
		},
		methods: {
			...mapActions({checkLogin:'checkLogin'}),
			// 获取二维码路径参数
			GetWxMiniProgramUrlParam(url) {
					let theRequest = {};
					if (url.indexOf("#") != -1) {
						const str = url.split("#")[1];
						const strs = str.split("&");
						for (let i = 0; i < strs.length; i++) {
							theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
						}
					} else if (url.indexOf("?") != -1) {
						const str = url.split("?")[1];
						const strs = str.split("&");
						for (let i = 0; i < strs.length; i++) {
							theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
						}
					}
					return theRequest;
			}
		}
	}
</script>

<style scoped>
.ab {
	position: absolute;
	width: 100%;
	bottom: 30upx;
}

.percent-head {
	text-align: center;
	position: relative;
	font-size: 340%;
}

.percent-content {
	width: 100%;
	position: relative;
	font-size: 240%;
	letter-spacing: 10upx;
}

.btn0 {
	font-size: 32upx;
	color: white;
	/* background: linear-gradient(-87deg, rgba(179, 234, 187, 1), rgba(77, 193, 93, 1)); */
	background:rgba(77, 193, 93, 1);
	width: 560upx;
	height: 98upx;
	border-radius: 99upx;
	margin: 20upx auto;
}

.btn1 {
	border: 4upx solid #2dad3f;
	background-color: rgba(0, 0, 0, 0);
	border-radius: 99upx;
	width: 560upx;
	height: 98upx;
	font-size: 32upx;
	color: #2dad3f;
	margin: 20upx auto;
}

.pages-auth {
	margin: auto;
	text-align: center;
	border-radius: 20upx;
	background-color: #ffffff;
	padding: 50upx;
}

.content-desc {
	padding: 0.5rem;
	line-height: 30upx;
	font-size: 30upx;
}

.contents {
	background-image: url(https://www.homeeyes.cn/app/images/bgstart.png);
	background-size: 100% 100%;
	margin: 0;
	padding: 50upx;
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background-color: #02be6d;
	display: flex;
}
.bottom-btn {
	margin-top: 30upx;
	margin-bottom: 20upx;
}
.no-login {
	float: right;
}
.w-90 {
	width: 90%;
}
.w-100 {
	width: 100%;
}
.login_avatar {
	margin-top: 210upx !important;
}
.v-center {
	margin: auto auto;
}
.back-img {
	height: 720upx;
}
.cu-btn[class*='line']::after {
	border-radius: 20upx;
}
.percent-image{
	text-align: center;
	margin-top: 20upx;
}
.percent-image image{
	border-radius: 50%;
}
.percents-boxs{
	margin: auto;
	margin-top: 50%;
}
.percents{
	display: flex;
}
</style>
